#include <stdlib.h>
#include <cstring>
#include <conio.h>
#include <iostream>

struct List_Data
{
	char Value[100];
	int count;
	List_Data *next;
	List_Data()
	{
		next=NULL;
		count=0;
	}
};

struct List
{
	List_Data *head, *tail;
	int count;

	List()
	{
		head = tail = NULL;
		count = 0;

	}

	void push_back(char Val[])
	{
		if (head)
		{
			List_Data *p=tail;
			List_Data *tmp=(List_Data*)malloc (sizeof(List_Data));
			strcpy(tmp->Value, Val);
			tmp->count=1;
			tmp->next=NULL;
			p->next=tmp;
			tail=tmp;
			count++;
		}
		else
		{
			head = tail = (List_Data*)malloc(sizeof(List_Data));
			strcpy(head->Value, Val);
			head->count=1;
			head->next=NULL;
			count = 1;
		}
	}

	List_Data *Search(char l[])
	{
		List_Data *p=head;
		if (head==0) return NULL;
		while ((p!=NULL)&&(strcmp(p->Value, l)))
		{
			p=p->next;
		}
		if (p==0) return NULL;
		else return p;
	}
};


